<%@page import="java.awt.print.Printable"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<html>

<head>
  <script type="text/javascript">
     function test1(){
       var jobuuid=$("#txt_jobuuid_1").val();
       $.ajax({
			type:'post',
			url:'${ctx}/phone/ajaxPickTaskList',
			data:{
				jobuuid:jobuuid
			},
			dataType:'json',
			success:function(data) {
				var status=data.status;
				var content=data.content;
				alert(status);
				alert(content);
			},
			error:function() {
				alert("网络繁忙，请稍后重试...");
			}
	   });
    }
    
    function test2(){
       
       var jobuuid=$("#txt_jobuuid_2").val();
       var taskCode=$("#txt_taskCode_2").val();
       var workBoxCode=$("#txt_workBoxCode_2").val();
         
       $.ajax({
			type:'post',
			url:'${ctx}/phone/ajaxBindBox',
			data:{
				jobuuid:jobuuid,
				taskCode:taskCode,
				workBoxCode:workBoxCode
			},
			dataType:'json',
			success:function(data) {
				var status=data.status;
				var content=data.content;
				alert(status);
				alert(content);
			},
			error:function() {
				alert("网络繁忙，请稍后重试...");
			}
	   });
    }
    
     function test3(){
       var taskCode=$("#txt_taskCode_3").val();
       $.ajax({
			type:'post',
			url:'${ctx}/phone/ajaxPickTaskDetail',
			data:{
				taskCode:taskCode
			},
			dataType:'json',
			success:function(data) {
				var status=data.status;
				var taskItem=data.taskItem;
				alert(status);
				alert("taskItemId:"+taskItem.id);
			},
			error:function() {
				alert("网络繁忙，请稍后重试...");
			}
	   });
    }
    
     function test4(){
       var taskItemId=$("#txt_taskItemId_4").val();
        var sku=$("#txt_sku_4").val();
       $.ajax({
			type:'post',
			url:'${ctx}/phone/ajaxPick',
			data:{
				taskItemId:taskItemId,
				sku:sku
			},
			dataType:'json',
			success:function(data) {
				var status=data.status;
				var content=data.content;
				alert(status);
				alert(content);
			},
			error:function() {
				alert("网络繁忙，请稍后重试...");
			}
	   });
    }
    
    function test5(){
       var expressNo=$("#txt_expressNo_5").val();
       var orderno=$("#txt_orderno_5").val();
       
       $.ajax({
			type:'post',
			url:'${ctx}/phone/ajaxPkgCheck',
			data:{
				expressNo:expressNo,
				orderno:orderno
			},
			dataType:'json',
			success:function(data) {
				var status=data.status;
				var content=data.content;
				alert(status);
				alert(content);
			},
			error:function() {
				alert("网络繁忙，请稍后重试...");
			}
	   });
    }
    
    
    function test6(){
       var orderno=$("#txt_orderno_6").val();
       var jobuuid=$("#txt_jobuuid_6").val();
       
       $.ajax({
			type:'post',
			url:'${ctx}/phone/ajaxPkg',
			data:{
				orderno:orderno,
				jobuuid:jobuuid
			},
			dataType:'json',
			success:function(data) {
				var status=data.status;
				var content=data.content;
				alert(status);
				alert(content);
			},
			error:function() {
				alert("网络繁忙，请稍后重试...");
			}
	   });
    }
    
    function test7(){
       var expressNo=$("#txt_expressNo_7").val();
       var jobuuid=$("#txt_jobuuid_7").val();
       var weight=$("#txt_weight_7").val();
       
       $.ajax({
			type:'post',
			url:'${ctx}/phone/ajaxSend',
			data:{
				expressNo:expressNo,
				jobuuid:jobuuid,
				weight:weight
			},
			dataType:'json',
			success:function(data) {
				var status=data.status;
				var content=data.content;
				alert(status);
				alert(content);
			},
			error:function() {
				alert("网络繁忙，请稍后重试...");
			}
	   });
    }
    
    function test77(){
       var expressNo=$("#txt_expressNo_77").val();
       var jobuuid=$("#txt_jobuuid_77").val();
       
       $.ajax({
			type:'post',
			url:'${ctx}/phone/ajaxSend_noweight',
			data:{
				expressNo:expressNo,
				jobuuid:jobuuid
			},
			dataType:'json',
			success:function(data) {
				var status=data.status;
				var content=data.content;
				alert(status);
				alert(content);
			},
			error:function() {
				alert("网络繁忙，请稍后重试...");
			}
	   });
    }
    
     
   function test8(){
       var carCode=$("#txt_carCode_8").val();
       var taskCode=$("#txt_taskCode_8").val();
       var jobuuid=$("#txt_jobuuid_8").val();
       
       $.ajax({
			type:'post',
			url:'${ctx}/phone/ajaxBindCar',
			data:{
				carCode:carCode,
				taskCode:taskCode,
				jobuuid:jobuuid
			},
			dataType:'json',
			success:function(data) {
				var status=data.status;
				var content=data.content;
				alert(status);
				alert(content);
			},
			error:function() {
				alert("网络繁忙，请稍后重试...");
			}
	   });
    }
    
     function test9(){
       var carCode=$("#txt_carCode_9").val();
       var taskCode=$("#txt_taskCode_9").val();
       var sku=$("#txt_sku_9").val();
       var taskItemId=$("#txt_taskItemId_9").val();
       $.ajax({
			type:'post',
			url:'${ctx}/phone/ajaxPickAndSetGooods',
			data:{
				carCode:carCode,
				taskCode:taskCode,
				sku:sku,
				taskItemId:taskItemId
			},
			dataType:'json',
			success:function(data) {
				var status=data.status;
				var content=data.content;
				alert(status);
				alert(content);
			},
			error:function() {
				alert("网络繁忙，请稍后重试...");
			}
	   });
    }
    

    function test10(){
       var shelfCode=$("#txt_shelfCode_10").val();
       var boxCode=$("#txt_boxCode_10").val();
       var jobuuid=$("#txt_jobuuid_10").val();
       
       $.ajax({
			type:'post',
			url:'${ctx}/phone/ajaxBindLightShelf',
			data:{
				shelfCode:shelfCode,
				boxCode:boxCode,
				jobuuid:jobuuid
			},
			dataType:'json',
			success:function(data) {
				var status=data.status;
				var content=data.content;
				alert(status);
				alert(content);
			},
			error:function() {
				alert("网络繁忙，请稍后重试...");
			}
	   });
    }
    
    function test11(){
        var shelfCode=$("#txt_shelfCode_11").val();
        var taskCode=$("#txt_taskCode_11").val();
        var sku=$("#txt_sku_11").val();
        
        $.ajax({
 			type:'post',
 			url:'${ctx}/phone/ajaxSetGoodsToLigthshelf',
 			data:{
 				shelfCode:shelfCode,
 				taskCode:taskCode,
 				sku:sku
 			},
 			dataType:'json',
 			success:function(data) {
 				var status=data.status;
 				var content=data.content;
 				alert(status);
 				alert(content);
 			},
 			error:function() {
 				alert("网络繁忙，请稍后重试...");
 			}
 	   });
     }
     
      function test12(){
        var orderno=$("#txt_orderno_12").val().trim();
        
        $.ajax({
 			type:'post',
 			url:'${ctx}/workOrder/ajaxCancelOrder',
 			data:{
 				orderno:orderno
 			},
 			dataType:'json',
 			success:function(data) {
 				var msg=data.msg;
 				if(msg=='success'){
 				   alert("取消成功");
 				}else{
 				   alert("取消失败！");
 				}
 				
 			},
 			error:function() {
 				alert("网络繁忙，请稍后重试...");
 			}
 	   });
     }
     
     function test13(){
        var jobuuid=$("#txt_jobuuid_13").val().trim();
        
        $.ajax({
 			type:'post',
 			url:'${ctx}/phone/ajaxCountTaskList',
 			data:{
 				jobuuid:jobuuid
 			},
 			dataType:'json',
 			success:function(data) {
 			
 			    var status=data.status;
 				var content=data.content;
 				alert(status);
 				alert(content);
 				
 				
 			},
 			error:function() {
 				alert("网络繁忙，请稍后重试...");
 			}
 	   });
     }
     
     function test14(){
        var jobuuid=$("#txt_jobuuid_14").val().trim();
        var taskId=$("#txt_taskId_14").val().trim();
        
        $.ajax({
 			type:'post',
 			url:'${ctx}/phone/ajaxTakeCountTask',
 			data:{
 				jobuuid:jobuuid,
 				taskId:taskId
 			},
 			dataType:'json',
 			success:function(data) {
 			    var status=data.status;
 				var content=data.content;
 				alert(status);
 				alert(content);
 			},
 			error:function() {
 				alert("网络繁忙，请稍后重试...");
 			}
 	   });
     }
     
     function test15(){
        var taskCode=$("#txt_taskCode_15").val().trim();
        var sku=$("#txt_sku_15").val().trim();
        var num=$("#txt_num_15").val().trim();
        var boxCode=$("#txt_boxCode_15").val().trim();
        
        $.ajax({
 			type:'post',
 			url:'${ctx}/phone/ajaxBoxCount',
 			data:{
 				taskCode:taskCode,
 				sku:sku,
 				num:num,
 				boxCode:boxCode
 			},
 			dataType:'json',
 			success:function(data) {
 			    var status=data.status;
 				alert(status);
 			},
 			error:function() {
 				alert("网络繁忙，请稍后重试...");
 			}
 	   });
     }
     
       function test16(){
        var taskCode=$("#txt_taskCode_16").val().trim();
        var sku=$("#txt_sku_16").val().trim();
        $.ajax({
 			type:'post',
 			url:'${ctx}/phone/ajaxSingleCount',
 			data:{
 				taskCode:taskCode,
 				sku:sku
 			},
 			dataType:'json',
 			success:function(data) {
 			    var status=data.status;
 				alert(status);
 			},
 			error:function() {
 				alert("网络繁忙，请稍后重试...");
 			}
 	   });
     }
     
     function test17(){
        var taskCode=$("#txt_taskCode_17").val().trim();
        
        $.ajax({
 			type:'post',
 			url:'${ctx}/phone/ajaxCompleteCount',
 			data:{
 				taskCode:taskCode
 			},
 			dataType:'json',
 			success:function(data) {
 			    var status=data.status;
 				alert(status);
 			},
 			error:function() {
 				alert("网络繁忙，请稍后重试...");
 			}
 	   });
     }
     
     function test18(){
        var jobuuid=$("#txt_jobuuid_18").val().trim();
        $.ajax({
 			type:'post',
 			url:'${ctx}/phone/ajaxUpTaskList',
 			data:{
 				jobuuid:jobuuid
 			},
 			dataType:'json',
 			success:function(data) {
 			    var status=data.status;
 			    var content=data.content;
 				alert(status);
 				alert(content);
 			},
 			error:function() {
 				alert("网络繁忙，请稍后重试...");
 			}
 	   });
     }
     
      function test19(){
        var jobuuid=$("#txt_jobuuid_19").val().trim();
        var taskId=$("#txt_taskId_19").val().trim();
        
        $.ajax({
 			type:'post',
 			url:'${ctx}/phone/ajaxTakeUpTask',
 			data:{
 				jobuuid:jobuuid,
 				taskId:taskId
 			},
 			dataType:'json',
 			success:function(data) {
 			    var status=data.status;
 				var content=data.content;
 				alert(status);
 				alert(content);
 			},
 			error:function() {
 				alert("网络繁忙，请稍后重试...");
 			}
 	   });
     }
     
     
     function test20(){
        var uptaskCode=$("#txt_uptaskCode_20").val().trim();
        var stockCode=$("#txt_stockCode_20").val().trim();
        var boxCode=$("#txt_boxCode_20").val().trim();
        
        $.ajax({
 			type:'post',
 			url:'${ctx}/phone/ajaxUpBox',
 			data:{
 				uptaskCode:uptaskCode,
 				stockCode:stockCode,
 				boxCode:boxCode
 			},
 			dataType:'json',
 			success:function(data) {
 			    var status=data.status;
 				var content=data.content;
 				alert(status);
 				alert(content);
 			},
 			error:function() {
 				alert("网络繁忙，请稍后重试...");
 			}
 	   });
     }
     
      function test21(){
        var uptaskCode=$("#txt_uptaskCode_21").val().trim();
        var sku=$("#txt_sku_21").val().trim();
        var stockCode=$("#txt_stockCode_21").val().trim();
        var boxCode=$("#txt_boxCode_21").val().trim();
        
        $.ajax({
 			type:'post',
 			url:'${ctx}/phone/ajaxUpSingle',
 			data:{
 				uptaskCode:uptaskCode,
 				sku:sku,
 				stockCode:stockCode,
 				boxCode:boxCode
 			},
 			dataType:'json',
 			success:function(data) {
 			    var status=data.status;
 				var content=data.content;
 				alert(status);
 				alert(content);
 			},
 			error:function() {
 				alert("网络繁忙，请稍后重试...");
 			}
 	   });
     }
     
     
       
  </script>
</head>

<body>

//////////////////////////////////////////////////////////////////////////////商发宝接口//////////////////////////////////////////////////////////////////////////////<br/><br/>

 <input type="button" value="查询待拣货任务列表" onclick="test1();"> 
   jobuuid: <input type="text" id="txt_jobuuid_1" value="paiuc6c1e21f-94d3-4c57-ba05-5d6e75786a7d"><br/><br/>

 <input type="button" value="拣货绑定分拣框" onclick="test2();"> 
    workBoxCode: <input type="text" id="txt_workBoxCode_2">  
    taskCode: <input type="text" id="txt_taskCode_2">
    jobuuid: <input type="text" id="txt_jobuuid_2">
   <br/><br/>
   
 <input type="button" value="查询拣货任务项" onclick="test3();"> 
    taskCode: <input type="text" id="txt_taskCode_3">
   <br/><br/>
   
    <input type="button" value="拣货" onclick="test4();"> 
     taskItemId: <input type="text" id="txt_taskItemId_4">  
     sku: <input type="text" id="txt_sku_4">
   <br/><br/>
   
   
    <input type="button" value="包装验证" onclick="test5();"> 
     expressNo: <input type="text" id="txt_expressNo_5">  
     orderno: <input type="text" id="txt_orderno_5">
   <br/><br/>
   
   
   <input type="button" value="包装" onclick="test6();"> 
     orderno: <input type="text" id="txt_orderno_6">  
     jobuuid: <input type="text" id="txt_jobuuid_6">
   <br/><br/>
   
   
   <input type="button" value="发货" onclick="test7();"> 
     expressNo: <input type="text" id="txt_expressNo_7">  
     jobuuid: <input type="text" id="txt_jobuuid_7">
     weight: <input type="text" id="txt_weight_7">
   <br/><br/>
   
   <input type="button" value="发货（不称重）" onclick="test77();"> 
     expressNo: <input type="text" id="txt_expressNo_77">  
     jobuuid: <input type="text" id="txt_jobuuid_77">
   <br/><br/>
   
   
    <input type="button" value="拣货任务绑定推车" onclick="test8();"> 
     carCode: <input type="text" id="txt_carCode_8">  
     taskCode: <input type="text" id="txt_taskCode_8">
     jobuuid: <input type="text" id="txt_jobuuid_8">
   <br/><br/>
   
   
   <input type="button" value="推车拣选" onclick="test9();"> 
     carCode: <input type="text" id="txt_carCode_9">  
     taskCode: <input type="text" id="txt_taskCode_9">
     taskItemId: <input type="text" id="txt_taskItemId_9">
     sku: <input type="text" id="txt_sku_9">
   <br/><br/>
   
   <input type="button" value="任务绑定灯光架" onclick="test10();"> 
     shelfCode: <input type="text" id="txt_shelfCode_10">  
     boxCode: <input type="text" id="txt_boxCode_10">
     jobuuid: <input type="text" id="txt_jobuuid_10">
   <br/><br/>
   
   <input type="button" value="灯光上架" onclick="test11();"> 
     shelfCode: <input type="text" id="txt_shelfCode_11">  
     taskCode: <input type="text" id="txt_taskCode_11">
     sku: <input type="text" id="txt_sku_11">
   <br/><br/>
   
   
   <input type="button" value="取消订单" onclick="test12();"> 
     orderno: <input type="text" id="txt_orderno_12">  
   <br/><br/>
   
   //////////////////////////////////////////////////////////////////////////////入库接口//////////////////////////////////////////////////////////////////////////////<br/><br/>
   
   <input type="button" value="查询点收任务" onclick="test13();"> 
     jobuuid: <input type="text" id="txt_jobuuid_13" value="paiuc6c1e21f-94d3-4c57-ba05-5d6e75786a7d">  
   <br/><br/>
   
   <input type="button" value="领取点收任务" onclick="test14();"> 
     jobuuid: <input type="text" id="txt_jobuuid_14" value="paiuc6c1e21f-94d3-4c57-ba05-5d6e75786a7d">
     taskId: <input type="text" id="txt_taskId_14">  
   <br/><br/>
   
   <input type="button" value="整箱点收" onclick="test15();"> 
     taskCode: <input type="text" id="txt_taskCode_15">
     sku: <input type="text" id="txt_sku_15">
     num: <input type="text" id="txt_num_15">
     boxCode: <input type="text" id="txt_boxCode_15">
   <br/><br/>
   
   <input type="button" value="散货点收" onclick="test16();"> 
     taskCode: <input type="text" id="txt_taskCode_16">
     sku: <input type="text" id="txt_sku_16">
   <br/><br/>
   
   <input type="button" value="完成点收" onclick="test17();"> 
     taskCode: <input type="text" id="txt_taskCode_17">
   <br/><br/>
   
    <input type="button" value="查询上架任务" onclick="test18();"> 
     jobuuid: <input type="text" id="txt_jobuuid_18" value="paiuc6c1e21f-94d3-4c57-ba05-5d6e75786a7d">  
    <br/><br/>
    
    <input type="button" value="领取上架任务" onclick="test19();"> 
     jobuuid: <input type="text" id="txt_jobuuid_19" value="paiuc6c1e21f-94d3-4c57-ba05-5d6e75786a7d">
     taskId: <input type="text" id="txt_taskId_19">  
    <br/><br/>
    
    <input type="button" value="整箱上架" onclick="test20();"> 
     uptaskCode: <input type="text" id="txt_uptaskCode_20" >
     stockCode: <input type="text" id="txt_stockCode_20">  
     boxCode: <input type="text" id="txt_boxCode_20">  
    <br/><br/>
    
    <input type="button" value="散货上架" onclick="test21();"> 
     uptaskCode: <input type="text" id="txt_uptaskCode_21" >
     sku: <input type="text" id="txt_sku_21">  
     stockCode: <input type="text" id="txt_stockCode_21">  
     boxCode: <input type="text" id="txt_boxCode_21">  
    <br/><br/>
    
    //////////////////////////////////////////////////////////////////////////////外包系统调用接口//////////////////////////////////////////////////////////////////////////////<br/><br/>
    
     <a class="btn btn-danger" href="${ctx}/api_test/createInstorageBill_test">创建入库单</a>
    <br/><br/>
    
     <a class="btn btn-danger" href="${ctx}/api_test/createGoodsInfo_test">创建商品信息</a>
    <br/><br/>

</body>
</html>
